<?php
class Q_Rule_RegExp extends Q_Rule_Abstract {

	protected $_params = array (
        'pattern' => '/.*/', 
        'field' => '', 
        'optional' => false
    );
    
    public function isValid($value) {
    
        return preg_match($this->getParam('pattern'), $value);
    
    }

}